namespace array_demo.Model.Dictionary
{
    public interface IDictionary<Key, Value>
    {
        bool IsEmpty { get; }

        int Count { get; }

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void Add(Key key, Value value);

        /// <summary>
        /// 移除
        /// </summary>
        /// <param name="key"></param>
        void Remove(Key key);

        /// <summary>
        /// 包含
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        bool contains(Key key);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Value Get(Key key);
        
        /// <summary>
        /// 重新设置值
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        void Set(Key key, Value value);
    }
}